package com.ywz.encryption;

import com.ywz.common.SymmetricAlgorithmUtils;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * 类描述 -> 对称加密算法测试类
 *
 * @Author: ywz
 * @Date: 2025/01/22
 */
@SpringBootTest
public class SymmetricAlgorithmTest {
    @Test
    public void test() {
        String content = "对称加密算法";
        System.out.println("原文：" + content);
        String encrypt = SymmetricAlgorithmUtils.encrypt(content);
        System.out.println("加密：" + encrypt);
        // 加密
        String content2 = "dfa442cd6c122a7dcefb39c847288262b84f75909272b43f3483448b44888977b1585bde28d7a2e9feada79debc1be8d";
        String decrypt = SymmetricAlgorithmUtils.decrypt(content2);
        System.out.println("解密：" + decrypt);
    }
}
